home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / MOR55SRC.ZIP / MORIA / SOURCE / CONFIG.H next >
C/C++ Source or Header  |  1992-12-07  |  10KB  |  324 lines

  1. /* source/config.h: configuration definitions
  2.  
  3.    Copyright (c) 1989-92 James E. Wilson
  4.  
  5.    This software may be copied and distributed for educational, research, and
  6.    not for profit purposes provided that this copyright and statement are
  7.    included in all such copies. */
  8.  
  9. #define CONFIG_H_INCLUDED
  10. #ifdef CONSTANT_H_INCLUDED
  11. Constant.h should always be included after config.h, because it uses
  12. some of the system defines set up here.
  13. #endif
  14.  
  15. /* Person to bother if something goes wrong.  */
  16. /* Recompile files.c and misc2.c if this changes.  */
  17. #define WIZARD    "David Grabiner"
  18. /* The wizard password and wizard uid are no longer used.  */
  19.  
  20.  
  21. /* System definitions.  You must define one of these as appropriate for
  22.    the system you are compiling moria on.  */
  23.  
  24. /* No system definition is needed for 4.3BSD, SUN OS, DG/UX.  */
  25.  
  26. /* If you are compiling on an ultrix/4.2BSD/Dynix/etc. version of UNIX,
  27.    define this.  It is not needed for SUNs.  */
  28. /* #ifndef ultrix
  29. #define ultrix
  30. #endif */
  31.  
  32. /* If you are compiling under IBM's AIX 3.0, then you can either define
  33.    SYS_V, or you can define nothing (thus compiling as if on a BSD system)
  34.    but you must comment out the AIX LFLAG line in the Makefile so that
  35.    moria will be linked with -lbsd.  */
  36.  
  37. /* If you are compiling on a SYS V version of UNIX, define this.  */
  38. /* #define SYS_V */
  39.  
  40. /* If you are compiling on a SYS III version of UNIX, define this.
  41.    The SYS_III support may not be complete.  I do not know if this works.  */
  42. /* #define SYS_III */
  43.  
  44. /* If you are compiling on an ATARI ST with Mark Williams C, define this.  */
  45. /* #define ATARIST_MWC */
  46.  
  47. /* If you are compiling on an Atari ST with GCC, you do not need to define
  48.    anything.  */
  49.  
  50. /* If you are compiling on an Atari ST with TC, define this.  */
  51. /* #define ATARIST_TC */
  52.  
  53. /* If you are compiling on a Macintosh with MPW C 3.0, define this.  */
  54. /* #define MAC */
  55.  
  56. /* If we are in Think C, then we must be on a mac.  */
  57. #ifdef THINK_C
  58. #define MAC
  59. #endif
  60.  
  61. /* For Xenix systems, define SYS_V and unix.  */
  62. #ifdef M_XENIX
  63. #define SYS_V
  64. #define unix
  65. #endif
  66.  
  67. /* If you are compiling under VMS, define this.  */
  68. /* #define VMS */
  69.  
  70. /* If you are using the tcio.c file instead of io.c, then define this.
  71.    The tcio.c file uses TURBO C builtin functions instead of curses library
  72.    calls.  It only works if you are using TURBO C.
  73.    The default is to assume you are using it if you are using TURBO C
  74.    on an IBM-PC.  */
  75. #if defined(MSDOS) && defined(__TURBOC__)
  76. #define USING_TCIO
  77. #endif
  78.  
  79.  
  80. /* Files used by moria, set these to valid pathnames for your system.  */
  81.  
  82. #ifdef MSDOS
  83. /* Files which can be in a varying place */
  84. #define MORIA_SAV    moriasav
  85. #define MORIA_TOP    moriatop
  86. #define MORIA_MOR    "news"
  87. #define MORIA_TOP_NAME    "scores"
  88. #define MORIA_SAV_NAME    "MORIA.SAV"
  89. #define MORIA_CNF_NAME    "MORIA.CNF"
  90. #define MORIA_HELP    "roglcmds.hlp"
  91. #define MORIA_ORIG_HELP    "origcmds.hlp"
  92. #define MORIA_WIZ_HELP    "rwizcmds.hlp"
  93. #define MORIA_OWIZ_HELP    "owizcmds.hlp"
  94. #define MORIA_WELCOME    "welcome.hlp"
  95. #define MORIA_VER    "version.hlp"
  96.  
  97. #else
  98. #ifdef MAC
  99.  
  100. /* These files are concatenated into the data fork of the app */
  101. /* The names are retained to find the appropriate text */
  102. #define MORIA_MOR    "news"
  103. #define MORIA_HELP    "roglcmds.hlp"
  104. #define MORIA_ORIG_HELP    "origcmds.hlp"
  105. #define MORIA_WIZ_HELP    "rwizcmds.hlp"
  106. #define MORIA_OWIZ_HELP    "owizcmds.hlp"
  107. #define MORIA_WELCOME    "welcome.hlp"
  108. #define MORIA_VER    "version.hlp"
  109. /* Do not know what will happen with these yet */
  110. #define MORIA_TOP    "Moria High Scores"
  111. /* File types and creators for the Mac */
  112. #define MORIA_FCREATOR    'MRIA'
  113. #define SAVE_FTYPE    'SAVE'
  114. #define INFO_FTYPE    'TEXT'
  115. #define SCORE_FTYPE    'SCOR'
  116. #define CONFIG_FTYPE    'CNFG'
  117.  
  118. /* Options for building resources:
  119.    THINK C doesn't have -D switch, so we need to define this stuff here.
  120.    Uncomment RSRC when building DumpRes1 or DumpRes2; uncomment RSRC_PARTn
  121.    as appropriate.  When building application, comment all of them.
  122.    I don't think any of this is necessary for MPW C -- BS.  */
  123. #ifdef THINK_C
  124. /* #define RSRC */    /* This copy is for creating resources.  */
  125.  
  126. /* THINK C can only take 32K data, so we need to dump the resources in
  127.    two parts.  */
  128. /* #define RSRC_PART1 */
  129. /* #define RSRC_PART2 */
  130. #endif
  131.  
  132. #else
  133.  
  134. #ifdef VMS
  135. #define MORIA_SAV    "moria.sav"
  136. /* These 3 files need a dot at the end to prevent VMS from deciding that
  137.    they are *.DAT files or anything else equally wierd. */
  138. #define MORIA_HOU    "moria:hours."
  139. #define MORIA_MOR    "moria:news."
  140. #define MORIA_TOP    "moria:scores."
  141. #define MORIA_HELP    "moria:roglcmds.hlp"
  142. #define MORIA_ORIG_HELP "moria:origcmds.hlp"
  143. #define MORIA_WIZ_HELP  "moria:rwizcmds.hlp"
  144. #define MORIA_OWIZ_HELP "moria:owizcmds.hlp"
  145. #define MORIA_WELCOME    "moria:welcome.hlp"
  146. #define MORIA_VER    "moria:version.hlp"
  147.  
  148. #else
  149.  
  150. #ifdef AMIGA
  151. #define MORIA_SAV     "moria.sav"
  152. #define MORIA_HOU    "moria:hours"
  153. #define MORIA_MOR    "moria:news"
  154. #define MORIA_TOP    "moria:scores"
  155. #define MORIA_HELP    "moria:roglcmds.hlp"
  156. #define MORIA_ORIG_HELP "moria:origcmds.hlp"
  157. #define MORIA_WIZ_HELP  "moria:rwizcmds.hlp"
  158. #define MORIA_OWIZ_HELP "moria:owizcmds.hlp"
  159. #define MORIA_WELCOME    "moria:welcome.hlp"
  160. #define MORIA_VER    "moria:version.hlp"
  161.  
  162. #else
  163. #if defined(GEMDOS)
  164. /* Atari ST */
  165. #define MORIA_SAV    "moria.sav"
  166. #define MORIA_HOU    "files\\hours"
  167. #define MORIA_MOR    "files\\news"
  168. #define MORIA_TOP    "files\\scores"
  169. #define MORIA_HELP    "files\\roglcmds.hlp"
  170. #define MORIA_ORIG_HELP    "files\\origcmds.hlp"
  171. #define MORIA_WIZ_HELP    "files\\rwizcmds.hlp"
  172. #define MORIA_OWIZ_HELP    "files\\owizcmds.hlp"
  173. #define MORIA_WELCOME    "files\\welcome.hlp"
  174. #define MORIA_VER    "files\\version.hlp"
  175.  
  176. #else
  177. #if defined(atarist) && defined(__GNUC__)
  178. /* atari-st compiled with gnu-c  */
  179.  
  180. #define MORIA_SAV    "moria.save"
  181. #define MORIA_HOU    (char *)prefix_file("files/hours")
  182. #define MORIA_MOR    (char *)prefix_file("files/news")
  183. #define MORIA_TOP    (char *)prefix_file("files/scores")
  184. #define MORIA_HELP    (char *)prefix_file("files/roglcmds.hlp")
  185. #define MORIA_ORIG_HELP    (char *)prefix_file("files/origcmds.hlp")
  186. #define MORIA_WIZ_HELP    (char *)prefix_file("files/rwizcmds.hlp")
  187. #define MORIA_OWIZ_HELP    (char *)prefix_file("files/owizcmds.hlp")
  188. #define MORIA_WELCOME    (char *)prefix_file("files/welcome.hlp")
  189. #define MORIA_VER    (char *)prefix_file("files/version.hlp")
  190.  
  191. #else
  192.  
  193. /* This must be unix.  */
  194. #define MORIA_SAV    "moria.save"
  195. #define MORIA_HOU    "/home/zariski/grabiner/moria/files/hours"
  196. #define MORIA_MOR    "/home/zariski/grabiner/moria/files/news"
  197. #define MORIA_TOP    "/home/zariski/grabiner/moria/files/scores"
  198. #define MORIA_HELP    "/home/zariski/grabiner/moria/files/roglcmds.hlp"
  199. #define MORIA_ORIG_HELP    "/home/zariski/grabiner/moria/files/origcmds.hlp"
  200. #define MORIA_WIZ_HELP    "/home/zariski/grabiner/moria/files/rwizcmds.hlp"
  201. #define MORIA_OWIZ_HELP    "/home/zariski/grabiner/moria/files/owizcmds.hlp"
  202. #define MORIA_WELCOME    "/home/zariski/grabiner/moria/files/welcome.hlp"
  203. #define MORIA_VER    "/home/zariski/grabiner/moria/files/version.hlp"
  204.  
  205. #endif
  206. #endif
  207. #endif
  208. #endif
  209. #endif
  210. #endif
  211.  
  212.  
  213. /* This sets the default user interface.  */
  214. /* To use the original key bindings (keypad for movement) set ROGUE_LIKE
  215.    to FALSE; to use the rogue-like key bindings (vi style movement)
  216.    set ROGUE_LIKE to TRUE.  */
  217. /* If you change this, you only need to recompile main.c.  */
  218. #define ROGUE_LIKE FALSE
  219.  
  220.  
  221. /* For the ANDREW distributed file system, define this to ensure that
  222.    the program is secure with respect to the setuid code, this prohibits
  223.    inferior shells.  It also does not relinquish setuid priviledges at the
  224.    start, but instead calls the ANDREW library routines bePlayer(), beGames(),
  225.    and Authenticate().  */
  226. /* #define SECURE */
  227.  
  228.  
  229.  
  230. /* System dependent defines follow.  You should not need to change anything
  231.    below.  */
  232.  
  233. #ifdef ATARIST_TC
  234. #define USG
  235. #include <stdio.h>    /* Needed for TC ...printf */
  236. #endif
  237.  
  238. #if defined(ATARIST_TC) || defined(ATARIST_MWC)
  239. #define ATARI_ST
  240. #endif
  241.  
  242. /* Substitute strchr for index on USG versions of UNIX.  */
  243. #if defined(SYS_V) || defined(MSDOS) || defined(MAC) || defined(VMS)
  244. #define index strchr
  245. #endif
  246. #ifdef ATARIST_TC
  247. #define index strchr
  248. #endif
  249.  
  250. #ifdef SYS_III
  251. char *index();
  252. #endif
  253.  
  254. /* Define USG for many systems, this is basically to select SYS V style
  255.    system calls (as opposed to BSD style).  */
  256. #if defined(SYS_III) || defined(SYS_V) || defined(MSDOS) || defined(MAC)
  257. #ifndef USG
  258. #define USG
  259. #endif
  260. #endif
  261.  
  262. #if defined(ATARIST_MWC) || defined(AMIGA) || defined(VMS)
  263. #define USG
  264. #endif
  265.  
  266. #ifdef AMIGA
  267. #ifndef ultrix
  268. #define ultrix
  269. #endif
  270. #endif
  271.  
  272. /* Pyramid runs 4.2BSD-like UNIX version */
  273. #if defined(Pyramid)
  274. #define ultrix
  275. #endif
  276.  
  277. #if defined(_MSC_VER) && (_MSC_VER < 600)
  278. #define register      /* MSC 4.0 still has a problem with register bugs ... */
  279. #endif
  280.  
  281. #ifdef MAC
  282. #ifdef RSRC
  283. #define MACRSRC        /* Defined if we are building the resources.  */
  284. #else
  285. #define MACGAME        /* Defined if we are building the game.  */
  286. #endif
  287. #endif
  288.  
  289. #ifdef MAC
  290. /* Screen dimensions */
  291. #define SCRN_ROWS    24
  292. #define SCRN_COLS    80
  293. #endif
  294.  
  295. #ifdef VMS
  296. #define unlink delete
  297. #define index strchr
  298. #define exit uexit
  299. /* In constants.h, ESCAPE is defined to be the CTRL-Z key, instead of the
  300.    escape key.  */
  301. #endif
  302.  
  303. #if defined(SYS_V) && defined(lint)
  304. /* Define this to prevent <string.h> from including <NLchar.h> on a PC/RT
  305.    running AIX.  This prevents a bunch of lint errors.  */
  306. #define RTPC_NO_NLS
  307. #endif
  308.  
  309. #ifdef SECURE
  310. extern int PlayerUID;
  311. #define getuid() PlayerUID
  312. #define geteuid() PlayerUID
  313. #endif
  314.  
  315. #ifdef THINK_C
  316. /* Apparently, THINK C is only happy if this is defined.  This can not
  317.    be defined in general, because some systems have include files which
  318.    merely test whether STDC is defined, they do not test the value.  */
  319. /* Check how standard we are: Some code tests value of __STDC__.  */
  320. #ifndef __STDC__
  321. #define __STDC__    0
  322. #endif
  323. #endif
  324.